<div id="RegForm" style="display:none;">
    <p class="Title"><span style="font-size:13px; visibility:hidden;">*</span>Регистрация</p>
    <hr class="Line" />
    <!--<form action="/site/registration" name="reg" method="post" class="PForm">-->
    <?php $form = $this->beginWidget('CActiveForm', array('action' => '/site/registration', 'htmlOptions' => array('enctype' => "multipart/form-data", 'method' => 'post',))); ?>
    <p>
		<span class="Red">*</span>Имя
	</p>
    <p>
		<span style="visibility:hidden;">*</span>
		<?php echo $form->textField($reg, 'username', array('class' => 'PText')); ?>
	</p>
    <p>
		<span class="Red">*</span>Электронная почта
	</p>
    <p>
		<span style="visibility:hidden;">*</span>
		<?php echo $form->textField($reg, 'email', array('class' => 'PText')); ?>
	</p>
    <table width="100%">
     <tr>
         <td>
			 <p><span class="Red">*</span>Пароль</p>
		 </td>
         <td style="padding-left:10px;">
			 <p>Подтвердить</p>
		 </td>
        <tr>
            <td>
				<span style="visibility:hidden;">*</span>
				<?php /* echo $form->passwordField($reg, 'password', array('class' => 'Pass')); */ ?>
                <input type="password" id="RegForm_password" class="Pass" onkeyup="ttt()" name="RegForm[password]" />
			</td>
            <td style="padding-left:10px;">
				<?php /* echo $form->passwordField($reg, 'password2', array('class' => 'Pass'), array('onkeyup' => 'ttt()')); */ ?>
                 <input type="password" id="RegForm_password2" class="Pass" onkeyup="ttt()" name="RegForm[password2]" />
			</td>
        </tr>
    </table>
    <p style="margin-top:27px;">
        <input type="checkbox" id="Checkbox" onchange="qqq()"/>
        <label style="margin-left:5px;">Принимаю </label>
        <a href="#" class="Green">пользовательское соглашение</a>
    </p>
    <div style="width:100%; height:51px;">
    <p class="Red" id="PassError" style="display:none;">Пароли не совпадают!</p>
    </div>
    <table>
		<tr>
			<td valign="top">
				<input type="submit" class="Reg" value=" " disabled="disabled" />
			</td>
			<td valign="top">
				<input type="button" class="Cancel" onclick="$(document).trigger('close.facebox');"/>
			</td>
		</tr>
	</table>
    
<script type="text/javascript" >
ttt = function(){
		var FP = $("#RegForm_password").value;
		var SP = $("#RegForm_password2").value;
		if(FP==SP){
				$("#PassError").hide();
				$(".Reg").removeAttr("disabled");
			}
			else
			{
				$("#PassError").show();
				$(".Reg").attr("disabled","disabled");
			}
	}

	qqq = function(){
		var qq = document.getElementById("Checkbox");
		//alert(qq.value);
		if(qq.value=="on"){
				$(".Reg").removeAttr("disabled");	
				//alert("Yes");
			}
			else
			{
				$(".Reg").attr("disabled","disabled");
				//alert("No");
			}
	}
</script>
    <?php $this->endWidget(); ?>
</div>









